<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>收货人信息表单</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
        }
        
        body {
            background-color: #f5f5f5;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            width: 100%;
            max-width: 500px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        
        .header {
            background-color: #f8f9fa;
            padding: 20px;
            border-bottom: 1px solid #e9ecef;
        }
        
        h1 {
            color: #333;
            font-size: 22px;
            text-align: center;
        }
        
        .form-container {
            padding: 30px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            color: #333;
            font-weight: 500;
            padding-left: 5px;
        }
        
        input[type="text"], input[type="tel"] {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            transition: border-color 0.3s;
        }
        
        input[type="text"]:focus, input[type="tel"]:focus {
            outline: none;
            border-color: #e74c3c;
            box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
        }
        
        textarea {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            resize: vertical;
            min-height: 100px;
            transition: border-color 0.3s;
        }
        
        textarea:focus {
            outline: none;
            border-color: #e74c3c;
            box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
        }
        
        .radio-group {
            display: flex;
            gap: 20px;
            margin-top: 5px;
        }
        
        .radio-option {
            display: flex;
            align-items: center;
        }
        
        .radio-option input {
            margin-right: 8px;
        }
        
        .checkbox-group {
            display: flex;
            align-items: center;
            margin-top: 5px;
        }
        
        .checkbox-group input {
            margin-right: 8px;
        }
        
        .submit-btn {
            width: 100%;
            padding: 14px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s;
            margin-top: 10px;
        }
        
        .submit-btn:hover {
            background-color: #2980b9;
        }
        
        .code-container {
            margin-top: 30px;
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .code-block {
            flex: 1;
            min-width: 300px;
            background-color: #2d3748;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .code-header {
            background-color: #4a5568;
            color: white;
            padding: 10px 15px;
            font-weight: bold;
        }
        
        .code-content {
            padding: 15px;
            color: #cbd5e0;
            font-family: 'Courier New', monospace;
            white-space: pre-wrap;
            overflow-x: auto;
            font-size: 14px;
        }
        
        .note {
            margin-top: 20px;
            padding: 15px;
            background-color: #e3f2fd;
            border-left: 4px solid #2196f3;
            border-radius: 4px;
            font-size: 14px;
        }
        
        @media (max-width: 600px) {
            .form-container {
                padding: 20px;
            }
            
            .code-container {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>收货人信息</h1>
        </div>
        
        <div class="form-container">
            <form id="shippingForm">
                <div class="form-group">
                    <label for="recipient">收货人</label>
                    <input type="text" id="recipient" name="recipient" placeholder="请输入收货人姓名">
                </div>
                
                <div class="form-group">
                    <label for="phone">手机号码</label>
                    <input type="tel" id="phone" name="phone" placeholder="请输入手机号码">
                </div>
                
                <div class="form-group">
                    <label for="region">所在地区</label>
                    <input type="text" id="region" name="region" placeholder="请选择省/市/区">
                </div>
                
                <div class="form-group">
                    <label for="address">详细地址</label>
                    <textarea id="address" name="address" placeholder="请输入详细地址"></textarea>
                </div>
                
                <div class="form-group">
                    <label>标签</label>
                    <div class="radio-group">
                        <div class="radio-option">
                            <input type="radio" id="home" name="tag" value="home" checked>
                            <label for="home">家</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="company" name="tag" value="company">
                            <label for="company">公司</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="school" name="tag" value="school">
                            <label for="school">学校</label>
                        </div>
                    </div>
                </div>
                
                <div class="form-group">
                    <div class="checkbox-group">
                        <input type="checkbox" id="default" name="default" checked>
                        <label for="default">设置为默认地址</label>
                    </div>
                </div>
                
                <button type="submit" class="submit-btn">提交</button>
            </form>
        </div>
        
        <div class="code-container">
            <div class="code-block">
                <div class="code-header">HTML 代码</div>
                <div class="code-content">
&lt;form id="shippingForm"&gt;
    &lt;div class="form-group"&gt;
        &lt;label for="recipient"&gt;收货人&lt;/label&gt;
        &lt;input type="text" id="recipient" name="recipient" placeholder="请输入收货人姓名"&gt;
    &lt;/div&gt;
    
    &lt;div class="form-group"&gt;
        &lt;label for="phone"&gt;手机号码&lt;/label&gt;
        &lt;input type="tel" id="phone" name="phone" placeholder="请输入手机号码"&gt;
    &lt;/div&gt;
    
    &lt;div class="form-group"&gt;
        &lt;label for="region"&gt;所在地区&lt;/label&gt;
        &lt;input type="text" id="region" name="region" placeholder="请选择省/市/区"&gt;
    &lt;/div&gt;
    
    &lt;div class="form-group"&gt;
        &lt;label for="address"&gt;详细地址&lt;/label&gt;
        &lt;textarea id="address" name="address" placeholder="请输入详细地址"&gt;&lt;/textarea&gt;
    &lt;/div&gt;
    
    &lt;div class="form-group"&gt;
        &lt;label&gt;标签&lt;/label&gt;
        &lt;div class="radio-group"&gt;
            &lt;div class="radio-option"&gt;
                &lt;input type="radio" id="home" name="tag" value="home" checked&gt;
                &lt;label for="home"&gt;家&lt;/label&gt;
            &lt;/div&gt;
            &lt;div class="radio-option"&gt;
                &lt;input type="radio" id="company" name="tag" value="company"&gt;
                &lt;label for="company"&gt;公司&lt;/label&gt;
            &lt;/div&gt;
            &lt;div class="radio-option"&gt;
                &lt;input type="radio" id="school" name="tag" value="school"&gt;
                &lt;label for="school"&gt;学校&lt;/label&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    
    &lt;div class="form-group"&gt;
        &lt;div class="checkbox-group"&gt;
            &lt;input type="checkbox" id="default" name="default" checked&gt;
            &lt;label for="default"&gt;设置为默认地址&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    
    &lt;button type="submit" class="submit-btn"&gt;提交&lt;/button&gt;
&lt;/form&gt;
                </div>
            </div>
            
            <div class="code-block">
                <div class="code-header">CSS 代码</div>
                <div class="code-content">
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    padding-left: 5px;
}

input[type="text"], input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="tel"]:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
}

.radio-option input {
    margin-right: 8px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.checkbox-group input {
    margin-right: 8px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #2980b9;
}
                </div>
            </div>
        </div>
        
        <div class="note">
            <strong>实现说明：</strong> 表单按照图片描述实现了所有字段，包括收货人、手机号码、所在地区、详细地址、标签选择和默认地址设置。所有输入框在获取焦点时边框会变为红色，并带有轻微的阴影效果，符合交互设计要求。
        </div>
    </div>
    
    <script>
        document.getElementById('shippingForm').addEventListener('submit', function(e) {
            e.preventDefault();
            alert('表单提交成功！');
        });
    </script>
</body>
</html>